<template>
  <div>
    <input ref="spanDom"/>
    <button @click="getSpanDom">点我获取节点</button>
    <TextRef ref="getMethods1"/>
    <button @click="getMethods">点我获取方法</button>
  </div>
</template>

<script>
import TextRef from './TextRef.vue';
export default {
    components:{
        TextRef
    },
    methods:{
        getSpanDom(){
            this.$refs.spanDom.style.color="red";
            console.log(this.$refs.spanDom.value);
        },
        getMethods(){
            this.$refs.getMethods1.text()
        }
    }
}
</script>

<style>

</style>